package cn.yzx.pethome.system.role.mapper;

import cn.yzx.pethome.system.menu.domain.Menu;
import cn.yzx.pethome.system.permission.domain.Permission;
import cn.yzx.pethome.system.role.domain.Role;
import cn.yzx.pethome.base.mapper.BaseMapper;
import cn.yzx.pethome.system.role.domain.RoleMenu;
import cn.yzx.pethome.system.role.domain.RolePermission;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yanzixuan
 * @since 2023-02-02
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {
    void addRoleMenu(RoleMenu roleMenu);

    void addRolePermission(RolePermission rolePermission);

    List<Menu> getMenuRoleId(Long id);

    List<Permission> getPermissionId(Long id);

    void delMenuByRoleId(Long id);

    void delPermissionByRoleId(Long id);

    List<String> getPermissionsByRoleId(List<Long> ids);
}
